package cnic.ai.nacos.controller

import com.alibaba.nacos.api.config.annotation.NacosValue
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.ResponseBody


@Controller
@RequestMapping("config")
class ConfigController {
    @NacosValue(value = "\${useLocalCache:false}", autoRefreshed = true)
    private val useLocalCache = false
    @GetMapping("/get")
    @ResponseBody
    fun get(): Boolean {
        return useLocalCache
    }
}